Skip to content

Add errors parameter to subprocess.call and check_call - #16540

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
dannyshafer:subprocess-call-errors
Oct 19, 2026
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
dannyshafer:subprocess-call-errors

Conversation

@dannyshafer

Copy link
Copy Markdown
Contributor

Fixes #16538.

call() and check_call() forward their keyword arguments to Popen, which accepts errors, so this adds errors: str | None = None to both (https://docs.python.org/3/library/subprocess.html#subprocess.call).

Prepared with Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

@JelleZijlstra
JelleZijlstra merged commit 4666b93 into python:main Oct 19, 2026
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

errors parameter missing in subprocess.call()/subprocess.check_call()

3 participants